package server.business.controller;

import org.springframework.web.bind.annotation.GetMapping;
import server.business.pojo.BloodLocation;
import server.business.service.BloodLocationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("/bloodLocation")
public class BloodLocationController {
    @Autowired
    BloodLocationService bloodLocationService;

    @RequestMapping("/normal/query")
    @ResponseBody
    public List<BloodLocation> queryData(){
        List<BloodLocation> list = bloodLocationService.queryData();
        return list;
    }

    @GetMapping(value = "/normal/getName")
    @ResponseBody
    public server.business.utils.results.lrz.Result getName() {
        List<BloodLocation> bloodLocations = bloodLocationService.list();
        return server.business.utils.results.lrz.Result.success(bloodLocations);
    }
}
